var myChart = echarts.init(document.getElementById("b1"))
var option = {
    title: {
        text: '词云图--沈林涛',
    },
    series:{
        type:'wordCloud',
        data:[
            {name:'沈林涛',value:11,color:"green",},
            {name:'杜杰',value:10},
            {name:'王舒鹏',value:10},
            {name:'郑驰雷',value:10},
            {name:'张恩杰',value:10},
            {name:'郑智凡',value:10}
        ],
        shape:'triangle',
    },
    textStyle: {
        color:"green",
        }
};
myChart.setOption(option)

var mychart2 = echarts.init(document.getElementById("b2"));

var option2 ={
    series:{
        type:'graph',
        layout:'force',
        force: {
            repulsion: 650,
        },
        label: {
            show: true
          },
        roam: true,
        draggable: true,
        data:[{
            name: '杜杰',
            category:1,
        },{
            name: '郑智凡',
            category:0,
        },{
            name: '王舒鹏',
            category:0,
        },{
            name: '张恩杰',
            category:2,
        },{
            name: '沈林涛',
            category:2,
        },{
            name: '郑驰雷',
            category:0,
        }],
        categories: [{
            name: '朋友',
            itemStyle: {
                color: 'red',
            },
        },{
            name: 'sb',
            itemStyle: {
                color: 'yellow',
            },
        },{
            name: '室友',
            itemStyle: {
                color: 'green',
            },
        }],
        symbolSize: 30,
        symbol: 'roundRect',
        links: [{
            source: '张恩杰',
            target: '沈林涛',
            lineStyle: {
                color: 'green',
                width: 10,
            },
            label: {
                formatter: '朋友',
                show: true,
            },
        },{
            source: '沈林涛',
            target: '王舒鹏',
            lineStyle: {
                color: 'green',
                width: 10,
            },
            label: {
                formatter: '室友',
                show: true,
            },
        },{
            source: '沈林涛',
            target: '郑驰雷',
            lineStyle: {
                color: 'green',
                width: 10,
            },
            label: {
                formatter: '室友',
                show: true,
            },
        },{
            source: '郑驰雷',
            target: '郑智凡',
            lineStyle: {
                color: 'green',
                width: 10,
            },
            label: {
                formatter: '朋友',
                show: true,
            },
        },{
            source: '沈林涛',
            target: '杜杰',
            lineStyle: {
                color: 'green',
                width: 10,
            },
            label: {
                formatter: '室友',
                show: true,
            },
        },],
        itemStyle: {
            color: 'red',
            borderColor: 'black',
        },
        label: {
            show: true,
            position: 'top',
        },
    },
    title:{
        text:'连线图',
        subtext:'沈林涛',
    },
};
mychart2.setOption(option2);

var myChart3 = echarts.init(document.getElementById("b3"));
var option3 = {
        series: [
          {
            type: 'gauge',
            startAngle: 90,
            endAngle: -270,
            color:{
                type: 'linear',
                x: 0,
                y: 0,
                x2: 0,
                y2: 1,
                colorStops: [{
                    offset: 0, color: '#604BE9' // 0% 处的颜色
                }, {
                    offset: 1, color: '#23B0B5' // 100% 处的颜色
                }],
                globalCoord: false // 缺省为 false
            },
            pointer: {
              show: false
            },
            progress: {
              show: true,
              overlap: false,
              roundCap: true,
              clip: false,
            },
            splitLine: {
              show: false,
              distance: 0,
              length: 10
            },
            axisTick: {
              show: false
            },
            axisLabel: {
              show: false,
              distance: 50
            },
            data:[{
                value: 75,
                name: '已完成-沈林涛',
                title: {
                    offsetCenter: ['0%', '40%']
                  },
                  detail: {
                    valueAnimation: true,
                    offsetCenter: ['0%', '0%']
                },}],
            detail: {
              width: 50,
              height: 40,
              fontSize: 30,
              color: 'auto',
              formatter: '{value}%',
            }
          }
        ]   
};
myChart3.setOption(option3);

var myChart4 = echarts.init(document.getElementById("b4"))
var option4 = {
    title: {
        text: '统计图--沈林涛',
    },
    geo: {
        map: '浙江',
        roam: true,
    },
    visualMap: {
        max:40,
        min:15,
        range:[0,50],
        inRand:{
            color:['green','yellow']
        },
        calculable:'true',
        top:'bottom',
        left:'center',
        orient:'horizontal',
    },
    series: [{
        type:'scatter',
        coordinateSystem: 'geo',
        data:[{
            name: '宁波',
            value: [121.5,29.7,30],
        },{
            name: '丽水',
            value: [119.2,28,25],
        },{
            name: '温州',
            value: [120.6,28,20],
        },{
            name: '杭州',
            value: [120.1,30.2,40],
        },{
            name: '金华',
            value: [119.6,29,20],
        },{
            name: '台州',
            value: [121.4,28.6,15],
        }],
        symbolSize: function(dataX){
            return dataX[2];
        },
        visualMap: {
            max:15,
            min:1,
            range:[2,10],
            inRand:{
                color:['green','yellow']
            },
            calculable:'true',
            top:'bottom',
            left:'center',
            orient:'horizontal',
        },
    }],
};
myChart4.setOption(option4);

